<?php
/**
* @version   $Id: firebug.php 4 2009-10-25 12:46:12Z edo888 $
* @package   Firebug Lite
* @copyright Copyright (C) 2009 Edvard Ananyan. All rights reserved.
* @license   GNU/GPL v3 http://www.gnu.org/licenses/gpl.html
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.plugin.plugin' );

/**
 * Firebug Lite plugin
 */
class  plgSystemFirebug extends JPlugin {
    /**
     * Constructor
     *
     * For php4 compatability we must not use the __constructor as a constructor for plugins
     * because func_get_args ( void ) returns a copy of all passed arguments NOT references.
     * This causes problems with cross-referencing necessary for the observer design pattern.
     *
     * @access  protected
     * @param   object $subject The object to observe
     * @param   array  $config  An array that holds the plugin configuration
     * @since   1.0
     */
    function plgSystemFirebug(& $subject, $config) {
        parent::__construct($subject, $config);

        //load the translation
        $this->loadLanguage( );
    }


    function onAfterInitialise() {
        global $mainframe;
        if($mainframe->isAdmin())
            return;

        $document =& JFactory::getDocument();
        $document->addStyleSheet(JURI::root(true).'/plugins/system/firebug/firebug-lite.css');
        $document->addScript(JURI::root(true).'/plugins/system/firebug/firebug-lite.js');
    }
}